﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microhard.Core.DBUtility;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Microhard.WarehouseInsp.Buz.BuzEnum;
using Microhard.Core.Extensions;

namespace Microhard.WarehouseInsp.Buz.Models
{
    public class SupervisionDetailModel : BasePermissionModel
    {
        public SupervisionDetailModel()
        {
            this.CreateTime = DateTime.Now;
        }

        [ModelPKID]
        public Guid DetailID { set; get; }
        public Guid ProjectID { set; get; }
        [DataType(DataType.Currency)]
        public decimal WarnAmount { set; get; }
        [DataType(DataType.Currency)]
        public decimal Guardline { set; get; }
        [DataType(DataType.Currency)]
        public decimal Worth { set; get; }
        [ReadOnly(true)]
        public DateTime CreateTime { set; get; }
        public int Status { set; get; }
        [ReadOnly(true)]
        public string StatusDisplay
        {
            get
            {
                var um = (PrjStatus)Enum.Parse(typeof(PrjStatus), this.Status.ToString());
                return um.GetDisplayText();
            }
        }
        [DataType(DataType.Currency)]
        public decimal OutPutPrdInsFee { set; get; }
    }
}
